from django.db import models


class login(models.Model):
    username = models.CharField(max_length=20)
    password = models.CharField(max_length=20)

class navigation(models.Model):
    nav = models.CharField(max_length=20,null=True)

class photos(models.Model):
    photo = models.CharField(max_length = 30)
    filename = models.FileField(upload_to='./file/')
    nid = models.ForeignKey(navigation,on_delete=models.CASCADE)

    def __unicode__(self):
        return self.photo
